package com.zb.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author WEN
 * @Date 2023/10/16 0016
 **/
@Data
@ApiModel("工单预约时间对象")
public class OrderReservationTimeVo {
    @NotNull(message = "工单ID参数不能为空")
    @ApiModelProperty(value = "工单ID", required = true)
    private Long workId;

    @NotNull(message = "预约日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "预约日期", required = true)
    private Date date;

    @NotNull(message = "预约开始时间不能为空")
    @JsonFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "预约开始时间", required = true)
    private Date reservationStartTime;

    @NotNull(message = "预约结束时间不能为空")
    @JsonFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "预约结束时间", required = true)
    private Date reservationEndTime;

    @Length(max = 100, message = "原因/备注长度限制 100 个字条")
    @ApiModelProperty(value = "原因/备注")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "上门结束时间", required = true)
    private Date lastEndTime;
}
